package com.enjoyor.soa.traffic.core.tsms.mapper.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.enjoyor.soa.traffic.core.tsms.constant.ExecuteTaskInfoSqlId;
import com.enjoyor.soa.traffic.core.tsms.domain.ExecuteTaskInfo;
import com.enjoyor.soa.traffic.core.tsms.domain.RltTaskTime;
import com.enjoyor.soa.traffic.core.tsms.mapper.IExecuteTaskInfoMapper;
import com.enjoyor.soa.traffic.frame.support.mybatis.mapper.impl.BaseMapper;

@Service
@Transactional
public class ExecuteTaskInfoMapper extends BaseMapper<ExecuteTaskInfo> implements IExecuteTaskInfoMapper {

	@Override
	public List<ExecuteTaskInfo> selectExecuteTaskList(Map<String, Object> map){
		return sqlSessionTemplate.selectList(getSqlName(ExecuteTaskInfoSqlId.SQL_SELECT_LIST), map);
	}
	
	@Override
	public int deleteByTaskId(String taskId) {
		return sqlSessionTemplate.delete(getSqlName(ExecuteTaskInfoSqlId.SQL_DELETE_BY_TASKID), taskId);
	}
	
	@Override
	public List<Map<String, Object>> selectExecuteStatusCollect(Map<String, Object> map){
		return sqlSessionTemplate.selectList(getSqlName(ExecuteTaskInfoSqlId.SQL_SELECT_EXECUTE_COLLECT), map);
	}
	
	@Override
	public List<Map<String, Object>> selectRealExecuteTime(Map<String, Object> map){
		return sqlSessionTemplate.selectList(getSqlName(ExecuteTaskInfoSqlId.SQL_SELECT_EXECUTE_TIME), map);
	}
}